struct Solution {}

fn main() {}

impl Solution {
    pub fn lexical_order(n: i32) -> Vec<i32> {
        let mut arr: Vec<String> = vec![];
        for i in 1..=n {
            arr.push(i.to_string());
        }
        arr.sort();
        let mut ret: Vec<i32> = vec![];
        for x in arr {
            ret.push(x.parse().unwrap());
        }
        ret
    }
}